﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace KhoaLuan.Controllers
{
    public class MenuController : Controller
    {
        //
        // GET: /Menu/
        LuanVanEntities db = new LuanVanEntities();
        public ActionResult MainMenu()
        {
            var model = db.Menus
                .Where(m=>m.Parent_id == 0 && m.Status ==true);
            return PartialView("_MainMenu", model);
        }
        public ActionResult MenuCapMot()
        {
            var model = new Menu();
            ViewBag.Capmot = db.Menus
                .Where(m => m.Level == 1 && m.Parent_id == 4 && m.Status == true);
            return PartialView("_MenuDaCap", model);
        }
        public ActionResult MenuCapHai()
        {
            var model = db.Menus
                .Where(m => m.Level == 2 && m.Status == true);
            return PartialView("_MainMenu", model);
        }
        public ActionResult Index()
        {
            return View();
        }
	}
}